<template>
	
		<el-row :gutter="5">
			<el-col :span="6">
				<xm-phase ref="xmPhase" :sel-project="projectInfo"  @check-change="onPhaseRowClick" />
			</el-col>
			<el-col :span="18">
				<xm-task-mng   :sel-project="projectInfo"  :parent-task="parentTask" :params="{ntype:'1'}" queryScope="plan" subOpType="mng"  @batch-add-submit="onBatchAddSubmit"/>
			</el-col>
		</el-row>
	
</template>

<script>
	import util from '@/components/mdp-ui/js/util';//全局公共库

	import { mapState } from 'pinia'
import { useUserStore } from '@/store/modules/user'
import { useXmStore } from '@/store/modules/xm'

  	import  XmPhase from '@/views/xm/core/xmTask/XmPhase.vue';//新增界面
 	import  XmTaskMng from '@/views/xm/core/xmTask/XmTaskMng.vue';//新增界面
	export default {

		components: {
			XmPhase,XmTaskMng
		},
		computed: {
		    ...mapState(useUserStore,[
		      'userInfo','roles' 
		    ]),

		    ...mapState(useXmStore,[ 'projectInfo' ]),

        },
		watch: {

	    },
		data() {
			return {
				parentTask:null, 

			}//end return
		},//end data
		methods: { 
			 
			 onPhaseRowClick(task,checked){
				if(checked){ 
					this.parentTask=task
				}else{
					this.parentTask=null
				}
			 },
			 onBatchAddSubmit(){
				this.$refs.xmPhase.refresh()
			 }
		},//end method
		mounted() {


		}//end mounted
	}

</script>

<style lang="less" scoped />
